@extends('admin.common.app')
@section('cont')
<section class="Hui-article-box">
    <nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页
        <span class="c-gray en">&gt;</span>管理员
        <span class="c-gray en">&gt;</span>管理员资料修改
        <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" >
            <i class="Hui-iconfont">&#xe68f;</i>
        </a>
    </nav>
    <article class="cl pd-20">
        @include('admin.common.msg')
        <form action="{{ route('admin.classify.update',$classify) }}" method="post" class="form form-horizontal" id="form-admin-add">
          @method('PUT')
           @csrf
            <div class="row cl">
                <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>分类名称：</label>
                <div class="formControls col-xs-8 col-sm-9">
                    <input type="text" class="input-text" value="{{$classify->name}}" placeholder="请输入分类名称" id="name" name="name" autocomplete="off">
                </div>
            </div>

            <div class="row cl">
                <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
                    <input class="btn btn-primary radius" type="submit" value="&nbsp;&nbsp;修改分类&nbsp;&nbsp;">
                </div>
            </div>
        </form>
    </article>
</section>
@endsection
@section('js')
    <script type="text/javascript" src="/admin/lib/jquery.validation/1.14.0/jquery.validate.js"></script>
    <script type="text/javascript" src="/admin/lib/jquery.validation/1.14.0/validate-methods.js"></script>
    <script type="text/javascript" src="/admin/lib/jquery.validation/1.14.0/messages_zh.js"></script>
    <script type="text/javascript">
        $(function(){
            $("#form-admin-add").validate({
               rules:{
                    name:{
                        required:true,
                    },
                },
                onkeyup:false,
                success:"valid",
                submitHandler: function (form) {
                    // 表单提交
                    form.submit();
                }
            });
        });
    </script>
@endsection
